import request from "@/utils/http";


// 获取轮播图
export const getBannersAPI = (distributionSite = 1) => {
    return request({
        url: "/home/banner",
        data: {
            distributionSite,
        },
    });
};

// 1. 封装前台API
export const getCategoryAPI = () => {
    return request({
        url: "/home/category/mutli",
    });
};

// 人气推荐
// 1. 封装API
export const getHotsAPI = () => {
    return request({
        url: "/home/hot/mutli",
    });
};
// 新鲜好物
// 1. 封装API
export const getNewGoodsAPI = (limit = 4) => {
    return request({
        url: "/home/new",
        params: { limit },
    });
};
// 猜你喜欢
// 1. 封装API
export const getLikesAPI = (data={}) => {
    return request({
        url: "/home/goods/guessLike",
        data
    });
};
// 推荐模块
export const getRecomendsAPI = (
    url,
    subTypeId = "",
    page = 1,
    pageSize = 10
) => {
    return request({
        url,
        data: {
            subType: subTypeId,
            page,
            pageSize,
        },
    });
};